package com.woniuxy;

import cn.hutool.core.lang.Snowflake;
import cn.hutool.core.util.IdUtil;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;


@SpringBootTest
public class testAlipay {
    @Test
    public void tests1(){
        Snowflake snowflake = IdUtil.getSnowflake(1, 1);

        // 2. 生成 ID
        for (int i = 0; i < 10; i++) {
            long id = snowflake.nextId();
            System.out.println("生成的分布式 ID: " + id);
        }
    }
}
